1. Field of the Invention
The present invention relates to computer graphics systems, and more specifically to a method and apparatus implemented in a digital display unit of a computer system for enabling a user to conveniently select a monitor mode corresponding to a received analog display signal.
2. Related Art
Digital display units (e.g., flat panel monitors) are often used to display images encoded in an analog display signal. A signal in SVGA format generated by a graphics controller circuit of a computer system is an example of such an analog display signal. An analog display signal generally includes display data signal and corresponding synchronization signals. The display data signal identifies a color intensity for each point of an image and the synchronization signals provide a time reference such that each portion of the display data signal can be correlated with a corresponding portion of the image.
In general, an analog display signal includes multiple frames, with each frame corresponding to an image. Each frame in turn includes multiple horizontal lines. The synchronization signals typically include horizontal and vertical synchronization signals to indicate transitions to next horizontal line and next frame respectively in the associated display data signal.
A digital display unit typically needs to process a received analog display signal to display the encoded images. Digital display units are usually capable of processing the received signal in one of several modes ("monitor modes"). The display signal parameters (described below) and other user-defined (or manufacturer-defined) parameters generally define a monitor mode. Using pixel data elements generated according to a monitor mode, the digital display unit actuates pixels (points) contained on a digital display screen.
For the sampled values to accurately represent the images encoded in a received display signal, a monitor mode needs to correspond to the `source mode` in which an analog display signal is generated. A source mode characterizes the display signal parameters with which the display signal is generated. For example, each mode may be characterized by the refresh rate (number of frames encoded in the display signal per second), the number of lines in each frame, the number of points forming each horizontal line, among others. As an illustration, the alphanumeric mode of the VGA standard may have a refresh rate of 70 Hertz (i.e., number of frames per second), with each frame including 400 horizontal lines (source image height) and each horizontal line including 720 pixel data element samples (source image width). The need for the monitor mode to correspond to the source mode in a typical digital display unit can be appreciated by considering the manner in which an example analog display signal is generated.
In a typical situation in a computer system, a source image is represented by a plurality of pixel data elements, with each pixel data element representing a point (pixel position) on the image. In the case of the alphanumeric mode of the VGA standard, a source image may be stored as 720 (source image width).times.400 (source image height) pixel data elements. A graphics controller circuit generates an analog display signal with image frames by converting each pixel data element into corresponding display data signal. A digital to analog converter (DAC) and a source clock (dot clock) are typically used for such a conversion.
As the analog display signal is typically designed to operate in conjunction with analog display monitors which need time for horizontal retrace while scanning horizontal lines of the analog display screen, the total number of pixels (HTOTAL) in each line is typically more than the source image width. For example, for the alphanumeric mode of the VGA standard, HTOTAL equals 900 pixels even though the source image width is 720. Similarly, VTOTAL representing the number of vertical lines in each frame is more than the source image height to allow for vertical retrace.
In general, a digital display unit needs to sample a received analog display signal to recover the pixel data elements from which the display signal was generated. For accurate recovery, the number of samples taken in each horizontal line needs to equal HTOTAL. Each horizontal line is usually identified by successive horizontal synchronization pulses. If the number of samples taken is not equal to HTOTAL, the sampling may be inaccurate and display artifacts may results as described with reference to FIG. 1.
FIGS. 1 is a diagram of the amplitude of a display signal as a function of time illustrating typical characteristics of analog display signals. Typically, a display signal portion for each pixel data element has a settling period (shown as 110-A and 110-B) before the steady-state (150-A and 150-B) is reached. The steady-state represents the value (e.g., color intensity) of the pixel data element in the source image. For an accurate reproduction of the source image pixel data values, the monitor mode needs to be designed to sample during steady-state. Hence, a digital display unit may need to sample each horizontal line of a received display signal a number of times equal to HTOTAL.
Therefore, a digital display unit typically needs the HTOTAL for accurate sampling of the received analog display signal. There are other display signal parameters which a digital display unit may need for accurate sampling of a received display signal. The number of colors, the horizontal start position (representing the pixel number in each horizontal line from which the source image data starts) and vertical start position (representing the line number from which the source image data starts) are examples of some of the other display parameters. A monitor mode is defined by monitor parameters which typically include at least some of such display parameters. Monitor modes include other parameters such as gamma correction and intensity (adjusted by user).
Many parameters are often defined by standards (e.g., VGA, SVGA) and a typical digital display unit measures some parameters and determines the others by examining data stored internally. That is, signal parameters such as VTOTAL, synchronization signal polarities, the time for receiving each horizontal line are measured. Data such as tables or arrays to correlate a set of measured parameters to a corresponding source mode is often maintained internally in a non-volatile memory. By determining a source mode according to the measured parameters and the stored data, the display signal parameters (such as HTOTAL) associated with the determined mode are used to process any subsequently received analog display signals.
One problem with the above-described scheme of determining the source mode is that some modes have the same display signal parameters even though the modes represent source images having different characteristics (e.g., size). For example, the alpha-numeric mode of the VGA standard generates display signals at 70 frames/second, with each frame representing 720.times.400 pixels. The graphics APA mode generates display signals at 70 frames/second with 640.times.400 pixels. Besides having the same refresh rate and source image height, the two modes can use the same polarities for the synchronization signals. At least for similar reasons, some source modes may not be distinguishable based purely on the measurement of some display signal parameters.
If a monitor mode is selected based on an incorrect source mode, the sampling can be inaccurate and display artifacts can result. In the above-noted examples, the APA mode display signal is generated with a HTOTAL of 800 with a horizontal start position of 147, and VGA alpha-numeric display signal is generated with a HTOTAL of 900 with a horizontal start position of 160. If a received signal is sampled with the wrong HTOTAL, at least some of the samples will be taken in the unstable settling periods of FIG. 1 and the incorrect sampling values result in display artifacts.
In addition, as the source widths are also different (640 for APA mode versus 720 for VGA alpha-numeric mode), the corresponding correct number of pixel data elements need to be used for display to avoid losing a portion of the image. Further, incorrect assumption of the start positions (horizontal or vertical) typically leads to the image being skewed incorrectly to a direction. Such effects may be undesirable.
Digital display units may use monitor modes with incorrect parameters in other situations as well. For example, given the same standard for a source, different manufacturers can implement the standard with different display signal parameters. As an illustration, manufacturers may maintain the same values for display signal parameters which can be readily measured, but have different values for parameters which cannot be measured. The HTOTAL and start positions can be different. In such situations also a display unit may sample a received analog display signal with incorrect monitor parameters, causing undesirable artifacts or skews in the displayed images.
Therefore, what is needed is a method and apparatus which enables a user to conveniently select a monitor mode which corresponds to the correct source mode when more than one source mode has the same measured display signal parameters.